package compilers.output;

import org.antlr.runtime.Token;

public class ErrorOutput {
	public ErrorOutput(Token token, String string) {
		if (token == null) {
			new ErrorOutput(string);
		} else {
			//System.out.println("[ERROR] Line " + token.getLine() + " (" + token.getCharPositionInLine() + ") - " + string);
			throw new Error("[ERROR] Line " + token.getLine() + " (" + token.getCharPositionInLine() + ") - " + string);
			//System.exit(0);
		}
	}

	public ErrorOutput(String string) {
		//System.out.println("[ERROR] - " + string);
		throw new Error("[ERROR] - " + string);
		//System.exit(0);
	}
}
